<?php
class Player_Model_Params
	extends Core_Model_Character_Param
{
	protected $_playerId;
	
	protected $_value;
	
	public function setPlayerId($id)
	{
		$this->_playerId	= (int) $id;
	}
	
	public function getPlayerId()
	{
		return $this->_playerId;
	}
	
	public function setValue($value)
	{
		if (strlen($value) > self::LENGTH)
		{
			throw new Core_Model_Character_Params_Exception('Cannot Set Value: Too long');
		}
		
		switch ($this->getType())
		{
			case self::PARAM_CHAR:
				$this->_value	= (string) $value;
				break;
			case self::PARAM_FLOAT:
				$this->_value	= (float) $value;
				break;
			case self::PARAM_INT:
				$this->_value	= (int) $value;
				break;
			default:
				throw new Core_Model_Character_Params_Exception('Cannot set Value: Invalid Type');
		}
	}
	
	public function getValue()
	{
		return $this->_value;
	}
}